<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class MessageResources</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class MessageResources</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">MessageResources class</p>
<p class="description"><p>General purpose abstract class that describes an API for retrieving  Locale-sensitive messages from underlying resource locations of an  unspecified design, and optionally utilizing the <div class="src-code"><ol><li><div class="src-line"><span class="src-id">MessageFormat</span></div></li>
</ol></div>  class to produce internationalized messages with parametric replacement.  &lt;p&gt; Calls to <div class="src-code"><ol><li><div class="src-line"><a href="../../php-mvc/util/MessageResources.html#methodgetMessage">getMessage</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
</ol></div> variants without a  <div class="src-code"><ol><li><div class="src-line"><span class="src-id"><a href="../../http/Locale.html">Locale</a></span></div></li>
</ol></div> argument are presumed to be requesting a message string  in the default <div class="src-code"><ol><li><div class="src-line"><span class="src-id"><a href="../../http/Locale.html">Locale</a></span></div></li>
</ol></div> for this JVM. &lt;p&gt; Calls to  <div class="src-code"><ol><li><div class="src-line"><a href="../../php-mvc/util/MessageResources.html#methodgetMessage">getMessage</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
</ol></div> with an unknown key, or an unknown  <div class="src-code"><ol><li><div class="src-line"><span class="src-id"><a href="../../http/Locale.html">Locale</a></span></div></li>
</ol></div> will return <div class="src-code"><ol><li><div class="src-line"><span class="src-id">null</span></div></li>
</ol></div> if the  <div class="src-code"><ol><li><div class="src-line"><span class="src-id"><a href="../../php-mvc/util/MessageResources.html#var$returnNull">returnNull</a></span></div></li>
</ol></div> property is set to <div class="src-code"><ol><li><div class="src-line"><span class="src-id">true</span></div></li>
</ol></div>.  Otherwise, a  suitable error message will be returned instead. &lt;p&gt; &lt;strong&gt;IMPLEMENTATION  NOTE&lt;/strong&gt; - Classes that extend this class must be Serializable so that  instances may be used in distributable application server environments.</p></p>
		<p class="notes">
			Located in <a class="field" href="_mvc---util---MessageResources.php.html">/mvc/util/MessageResources.php</a> (line <span class="field">51</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																																								<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$config" title="details" class="var-name">$config</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$defaultLocale" title="details" class="var-name">$defaultLocale</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$locales" title="details" class="var-name">$locales</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$messages" title="details" class="var-name">$messages</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$returnNull" title="details" class="var-name">$returnNull</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																				
												<div class="method-definition">
											<span class="method-result">MessageResources</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">factory</span>&nbsp;<span class="var-name">$config</span>, <span class="var-type">config</span>&nbsp;<span class="var-name">$returnNull</span>, <span class="var-type">returnNull</span>&nbsp;<span class="var-name">2</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#format" title="details" class="method-name">format</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$message</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$locale</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$placeHolders</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">text</span>
										<a href="#getMessage" title="details" class="method-name">getMessage</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$locale</span>, <span class="var-type">key</span>&nbsp;<span class="var-name">$key</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$placeHolders</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#loadLocale" title="details" class="method-name">loadLocale</a>
											(<span class="var-type">localeKey</span>&nbsp;<span class="var-name">$localeKey</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#localeKey" title="details" class="method-name">localeKey</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$locale</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#messageKey" title="details" class="method-name">messageKey</a>
											(<span class="var-type">localeKey</span>&nbsp;<span class="var-name">$localeKey</span>, <span class="var-type">key</span>&nbsp;<span class="var-name">$key</span>)
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$config" id="$config"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$config</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">74</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The configuration parameter used to initialize this MessageResources.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$defaultLocale" id="$defaultLocale"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$defaultLocale</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">87</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The default Locale for our environment.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$locales" id="$locales"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$locales</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">61</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The set of locale keys for which we have already loaded messages, keyed  by the value calculated in <div class="src-code"><ol><li><div class="src-line"><span class="src-id">localeKey</span><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
</ol></div>.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$messages" id="$messages"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$messages</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">68</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The cache of messages we have accumulated over time, keyed by the value  calculated in <div class="src-code"><ol><li><div class="src-line"><span class="src-id">messageKey</span><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
</ol></div>.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$returnNull" id="$returnNull"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$returnNull</span>
			 = <span class="var-default"> false</span>			(line <span class="line-number">81</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Indicate is a <div class="src-code"><ol><li><div class="src-line"><span class="src-id">null</span></div></li>
</ol></div> is returned instead of an error message  string when an unknown Locale or key is requested.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">102</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Construct a new PropertyMessageResources according to the specified  parameters.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">MessageResources</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">factory</span>&nbsp;<span class="var-name">$config</span>, <span class="var-type">config</span>&nbsp;<span class="var-name">$returnNull</span>, <span class="var-type">returnNull</span>&nbsp;<span class="var-name">2</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">returnNull</span>
				<span class="var-name">2</span><span class="var-description">: The returnNull property we should initialize with</span>			</li>
					<li>
				<span class="var-type">factory</span>
				<span class="var-name">$config</span><span class="var-description">: The MessageResourcesFactory that created us</span>			</li>
					<li>
				<span class="var-type">config</span>
				<span class="var-name">$returnNull</span><span class="var-description">: The configuration parameter for this                    MessageResources</span>			</li>
				</ul>
		
			
	</div>
<a name="methodformat" id="format"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">format</span> (line <span class="line-number">213</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			format
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$message</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$locale</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$placeHolders</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$message</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$locale</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$placeHolders</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetMessage" id="getMessage"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getMessage</span> (line <span class="line-number">130</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a text message for the specified key, for the default Locale. A</p>
<p class="description"><p>null string result will be returned by this method if no relevant  message resource is found for this key or Locale, if the  <div class="src-code"><ol><li><div class="src-line"><span class="src-id"><a href="../../php-mvc/util/MessageResources.html#var$returnNull">returnNull</a></span></div></li>
</ol></div> property is set.  Otherwise, an appropriate  error message will be returned. &lt;p&gt; This method must be implemented by  a concrete subclass.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> message for the specified key and locale</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">text</span>
		<span class="method-name">
			getMessage
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$locale</span>, <span class="var-type">key</span>&nbsp;<span class="var-name">$key</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$placeHolders</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">locale</span>
				<span class="var-name">$locale</span><span class="var-description">: The requested message Locale, or <div class="src-code"><ol><li><div class="src-line"><span class="src-id">null</span></div></li>
</ol></div> for                the system default Locale</span>			</li>
					<li>
				<span class="var-type">key</span>
				<span class="var-name">$key</span><span class="var-description">: The message key to look up</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$placeHolders</span>			</li>
				</ul>
		
			
	</div>
<a name="methodloadLocale" id="loadLocale"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">loadLocale</span> (line <span class="line-number">268</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Load the messages associated with the specified Locale key.  For this</p>
<p class="description"><p>implementation, the <div class="src-code"><ol><li><div class="src-line"><span class="src-id"><a href="../../php-mvc/util/MessageResources.html#var$config">config</a></span></div></li>
</ol></div> property should contain a fully  qualified package and resource name, separated by periods, of a series  of property resources to be loaded from the class loader that created  this PropertyMessageResources instance.  This is exactly the same name  format you would use when utilizing the <div class="src-code"><ol><li><div class="src-line"><span class="src-id">java</span>.<span class="src-id">util</span>.<span class="src-id">PropertyResourceBundle</span></div></li>
</ol></div>  class.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			loadLocale
		</span>
					(<span class="var-type">localeKey</span>&nbsp;<span class="var-name">$localeKey</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">localeKey</span>
				<span class="var-name">$localeKey</span><span class="var-description">: Locale key for the messages to be retrieved</span>			</li>
				</ul>
		
			
	</div>
<a name="methodlocaleKey" id="localeKey"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">localeKey</span> (line <span class="line-number">253</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Compute and return a key to be used in caching information by a Locale.</p>
<p class="description"><p>&lt;strong&gt;NOTE&lt;/strong&gt; - The locale key for the default Locale in our  environment is a zero length String.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			localeKey
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$locale</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">locale</span>
				<span class="var-name">$locale</span><span class="var-description">: The locale for which a key is desired</span>			</li>
				</ul>
		
			
	</div>
<a name="methodmessageKey" id="messageKey"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">messageKey</span> (line <span class="line-number">242</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Compute and return a key to be used in caching information by locale  key and message key.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			messageKey
		</span>
					(<span class="var-type">localeKey</span>&nbsp;<span class="var-name">$localeKey</span>, <span class="var-type">key</span>&nbsp;<span class="var-name">$key</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">localeKey</span>
				<span class="var-name">$localeKey</span><span class="var-description">: The locale key for which this cache key is calculated</span>			</li>
					<li>
				<span class="var-type">key</span>
				<span class="var-name">$key</span><span class="var-description">: The message key for which this cache key is                   calculated</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Fri, 08 Feb 2008 14:32:41 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0</a>
	</p>
	</div></body>
</html>